package org.itest.httpclient.service.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sunxinhe
 */
@RestController
public class FooController  {

    @PostMapping("/success/")
    public String success(){
        return "Success";
    }

    @PostMapping("/failed/")
    public String failed(){
        try {
            Thread.sleep(8000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "Failed";
    }
}
